* Replication file for Timothy J. Ryan, "Reconsidering Moral Issues in Politics," JOP 2014.
* Questions, contact TJRyan@umich.edu

* This file produces Figure 3.

clear all
set more off
cd "/Users/TJRyan/Dropbox/morality/YM/6_replication"
use egss.dta, clear


lab def partisan 0 "Strong Dem." 3 "Independent" 6 "Strong Rep."
lab val pidr2 partisan
set scheme sj
svyset [pw=poststrat]
xi: svy: reg moralizer i.pidr2
margins, over(pidr2)
marginsplot, ysc(r(.25 .7)) ylab(.3(.1).7) ytitle("") ///
 xtitle("") ///
 xlab(0 "Strong Dem." 1 " " 2 " " 3 "Independent" 4 " " 5 " " 6 "Strong Rep.") ///
 title("EGSS")
graph save "U-EGSS", replace

use "mtrep.dta", clear
xi: reg moralizer i.pidr2
margins, over(pidr2)
marginsplot, ysc(r(.25 .7)) ylab(.3(.1).7) ytitle("") ///
	xtitle("") title("MTurk") ///
	xlab(0 "Strong Dem." 1 " " 2 " " 3 "Independent" 4 " " 5 " " 6 "Strong Rep.")
graph save "U-MT", replace


use "studentrep.dta", clear
xi: reg moralizer i.pidr2
margins, over(pidr2)
marginsplot, ysc(r(.25 .7)) ylab(.3(.1).7) ytitle("Moral Propensity Measure") ///
	xtitle("") title("Student Sample") ///
	xlab(0 "Strong Dem." 1 " " 2 " " 3 "Independent" 4 " " 5 " " 6 "Strong Rep.")
graph save "U-UM", replace

cd "/Users/TJRyan/Dropbox/morality/YM/6_replication"
graph combine U-UM.gph U-MT.gph U-EGSS.gph, rows(1) ysize(2) xsize(6.5)  imargin(vlarge)
